package de.slothsoft.wasbinich.swingclient.database;

import de.slothsoft.wasbinich.core.WasBinIch;
import de.slothsoft.wasbinich.core.database.Database;
import de.slothsoft.wasbinich.core.database.LoginBean;
import de.slothsoft.wasbinich.core.database.ManagerBean;
import de.slothsoft.wasbinich.core.database.webservice.RestCommunicator;
import de.slothsoft.wasbinich.core.database.webservice.WebserviceManagerBean;

public class DummyDatabase extends SwingWebserviceDatabase {

    static {
	WasBinIch.DEBUG = true;
    }

    public static final Database INSTANCE = new DummyDatabase();
    private final RestCommunicator restCommunicator = new DummyRestCommunicator();

    private DummyDatabase() {
	Database.initInstance(this);
    }

    @Override
    protected LoginBean createLoginBean() {
	return new DummyLoginBean();
    }

    @Override
    protected ManagerBean createManagerBean() {
	return new WebserviceManagerBean(getRestCommunicator());
    }

    @Override
    protected RestCommunicator getRestCommunicator() {
	return this.restCommunicator;
    }

}
